๐ FLUX.2 [klein] โ Sub-second generation. Open weights, Apache 2.0, API from $0.014/image. Learn more โ
curl --request POST \
--url https://api.bfl.ai/v1/flux-dev \
--header 'Content-Type: application/json' \
--header 'x-key: <api-key>' \
--data '
{
"prompt": "ein fantastisches bild",
"image_prompt": "<string>",
"width": 1024,
"height": 768,
"steps": 28,
"prompt_upsampling": false,
"seed": 42,
"guidance": 3,
"safety_tolerance": 2,
"output_format": "jpeg",
"webhook_url": "<string>",
"webhook_secret": "<string>"
}
'{
"id": "<string>",
"polling_url": "<string>",
"cost": 123,
"input_mp": 123,
"output_mp": 123
}Submits an image generation task with FLUX.1 [dev].
curl --request POST \
--url https://api.bfl.ai/v1/flux-dev \
--header 'Content-Type: application/json' \
--header 'x-key: <api-key>' \
--data '
{
"prompt": "ein fantastisches bild",
"image_prompt": "<string>",
"width": 1024,
"height": 768,
"steps": 28,
"prompt_upsampling": false,
"seed": 42,
"guidance": 3,
"safety_tolerance": 2,
"output_format": "jpeg",
"webhook_url": "<string>",
"webhook_secret": "<string>"
}
'{
"id": "<string>",
"polling_url": "<string>",
"cost": 123,
"input_mp": 123,
"output_mp": 123
}Documentation Index
Fetch the complete documentation index at: https://docs.bfl.ml/llms.txt
Use this file to discover all available pages before exploring further.
Text prompt for image generation.
"ein fantastisches bild"
Optional base64 encoded image to use as a prompt for generation.
Width of the generated image in pixels. Must be a multiple of 32.
256 <= x <= 1440Must be a multiple of 32Height of the generated image in pixels. Must be a multiple of 32.
256 <= x <= 1440Must be a multiple of 32Number of steps for the image generation process.
1 <= x <= 5028
Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation.
Optional seed for reproducibility.
42
Guidance scale for image generation. High guidance scales improve prompt adherence at the cost of reduced realism.
1.5 <= x <= 53
Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict.
0 <= x <= 62
Output format for the generated image. Can be 'jpeg', 'png', or 'webp'.
jpeg, png, webp URL to receive webhook notifications
1 - 2083Optional secret for webhook signature verification
Was this page helpful?